Testing

Use POSTMAN or any other rest client to test the APIS.

GET Request

GET Request

Note: For more details, please refer to Security Configuration section in application.yaml.

Install POSTMAN and import the below postman project to test the APIS.

{
	"info": {
		"_postman_id": "12409fb8-cd13-4932-924a-3f9316572c8c",
		"name": "Upgrade Utility",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "3523130"
	},
	"item": [
		{
			"name": "systemVersions",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "qatester3",
							"type": "string"
						},
						{
							"key": "username",
							"value": "qatester3",
							"type": "string"
						}
					]
				},
				"method": "GET",
				"header": [],
				"url": {
					"raw": "http://localhost:portnumber/UpgradeUtility/api/systemVersions",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "6060",
					"path": [
						"UpgradeUtility",
						"api",
						"systemVersions"
					]
				}
			},
			"response": []
		},
		{
			"name": "Upgrade",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "qatester3",
							"type": "string"
						},
						{
							"key": "username",
							"value": "qatester3",
							"type": "string"
						}
					]
				},
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"currentSystemVersion\": \"11.2.0.0\",\r\n    \"systemVersionToUpgrade\": \"12.1.0.0\"\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "http://localhost:portnumber/UpgradeUtility/api/systemVersions/upgrade",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "6060",
					"path": [
						"UpgradeUtility",
						"api",
						"systemVersions",
						"upgrade"
					]
				}
			},
			"response": []
		},
		{
			"name": "Modules",
			"protocolProfileBehavior": {
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "qatester3",
							"type": "string"
						},
						{
							"key": "username",
							"value": "qatester3",
							"type": "string"
						}
					]
				},
				"method": "GET",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "http://localhost:portnumber/UpgradeUtility/api/modules",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "6060",
					"path": [
						"UpgradeUtility",
						"api",
						"modules"
					]
				}
			},
			"response": []
		},
		{
			"name": "Module Details",
			"protocolProfileBehavior": {
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "qatester3",
							"type": "string"
						},
						{
							"key": "username",
							"value": "qatester3",
							"type": "string"
						}
					]
				},
				"method": "GET",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "http://localhost:portnumber/UpgradeUtility/api/modules/7C1032AA-7857-48D8-9209-7C8394FC691D",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "6060",
					"path": [
						"UpgradeUtility",
						"api",
						"modules",
						"7C1032AA-7857-48D8-9209-7C8394FC691D"
					]
				}
			},
			"response": []
		},
		{
			"name": "Rollback",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "qatester3",
							"type": "string"
						},
						{
							"key": "username",
							"value": "qatester3",
							"type": "string"
						}
					]
				},
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\r\n   \"rollbackToVersion\":\"12.1.0.0\"\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "http://localhost:portnumber/UpgradeUtility/api/systemVersions/rollback",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "6060",
					"path": [
						"UpgradeUtility",
						"api",
						"systemVersions",
						"rollback"
					]
				}
			},
			"response": []
		},
		{
			"name": "Authenticate",
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "qatester3",
							"type": "string"
						},
						{
							"key": "username",
							"value": "qatester3",
							"type": "string"
						}
					]
				},
				"method": "POST",
				"header": [],
				"url": {
					"raw": "http://localhost:portnumber/UpgradeUtility/api/authenticate",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "6060",
					"path": [
						"UpgradeUtility",
						"api",
						"authenticate"
					]
				}
			},
			"response": []
		}
	]
}